#定义一个学生类，属性要求包含学生姓名、学号以及语数英三课成绩，而且要能够设置成绩，并打印出该学生所有成绩
class Student:
    def __init__(self,name,student_id):
        self.name=name
        self.student_id=student_id
        self.grades={"语文":0,"数学":0,"英语":0}
    def set_grades(self,course,grade):
        if course in self.grades:
            self.grades[course]=grade
    def print_grades(self):
        print(f"学生{self.name}（学号：{self.student_id}）的成绩为：{self.grades}")
        for course in self.grades:
            print(f"{course}:{self.grades[course]}")
chen = Student("小陈","1")
chen.set_grades("语文",98)
chen.set_grades("数学",89)
chen.print_grades()
zeng = Student("小曾","2")
print(chen.name)
zeng.set_grades("数学",96)
print(zeng.grades)